----------------------------------------------
-- @name: full_hint_concatenation
-- @author: dion cho
-- @description: test for full hint convention
----------------------------------------------

@capture_on

drop table t1 purge;
create table t1(c1 int, c2 int);
create index t1_n1 on t1(c1);
create index t1_n2 on t1(c2);

insert into t1
select level, level
from dual
connect by level <= 10000
;

@gather t1


explain plan for
select * 
from t1
where c1 = :b1 or c2 = :b2
;

@plan

explain plan for
select /*+ use_concat */ * 
from t1
where c1 = :b1 or c2 = :b2
;

@plan

explain plan for
select /*+ use_concat full(t1) */ * 
from t1
where c1 = :b1 or c2 = :b2
;

@plan

explain plan for
select /*+ use_concat full(t1) */ * 
from t1
where c1 = :b1 or c2 = :b2
;

select * from table(dbms_xplan.display(null,null,'outline'));


explain plan for
select /*+ use_concat */ * 
from t1
where c1 = :b1 or c2 = :b2
;

select * from table(dbms_xplan.display(null,null,'outline'));

explain plan for
select /*+ use_concat FULL(@"SEL$1_1" "T1"@"SEL$1")  */ 
  *
from t1
where c1 = :b1 or c2 = :b2
;

@plan

explain plan for
select /*+ use_concat FULL(@"SEL$1_1" "T1"@"SEL$1")  
            INDEX(@"SEL$1_2" "T1"@"SEL$1_2" ("T1"."C1")) */ 
  *
from t1
where c1 = :b1 or c2 = :b2
;

@plan


@capture_off
